As is known to those of skill in the art, a polynomial is a mathematical expression comprising one or more terms, each of which consists of a constant multiplied by one or more variables raised to a non-negative integer exponent (e.g. a+bx+cx2, where a, b and c are the constants and x is the variable).
Polynomials are very common as they can be used to calculate a variety of values and/or model certain behavior. For example, a point (a1, a2, a3) 102 is determined to be on one side of a triangle 104 defined by three points (0, 0, 0), (b1, b2, b3), and (c1, c2, c3) as shown in FIG. 1, diagram (a) if the equation below is true:a1b2c3−a1b3c2−a2b1c3+a2b3c1+a3b1c2−a3b2c1≥0
In another example, a line passing through the point (0,0,0) and (v1, v2, v3) 106 is determined to pass through a sphere 108 defined by a radius r and centre (c1, c2, c3), as shown in FIG. 1, diagram (b), if the equation below is true:(v1c1+v2c2+v3c3)2−(v12+v22+v32)(c12+c22+c32−r2)≥0
In further examples, polynomials may be used to implement filters, perform memory address calculations, perform binary to decimal conversion, etc. A variety of number and graphics formats have polynomial interpretations (e.g. floating-point formats, UNORM and SNORM graphics formats) and certain logical operations (e.g. inversion, XORing each bit of a with bit s) are also polynomial.
When a polynomial is evaluated in hardware it may be evaluated using fixed point or floating point number representations. As is known to those skilled in the art a fixed point number representation is a representation of a number that has a fixed number of digits after the radix point (e.g. decimal point or binary point). In contrast, a floating point number representation of a number is a representation of a number where the radix point is not fixed (i.e. it can “float”). In other words the radix point can be placed anywhere within the representation.
The embodiments described below are not limited to implementations which solve any or all of the disadvantages of known systems and method for implementing fixed-point polynomials.